package com.lyfei.ydc.domain.entity;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.lyfei.ydc.domain.BaseEntity;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.util.Date;

@Getter
@Setter
@TableName("t_spu")
public class Spu extends BaseEntity<Spu> {
    private String title;

    private String subTitle;

    private Long categoryId;

    private Long rootCategoryId;

    private Boolean online;

    /**
     * 文本型价格，有时候SPU需要展示的是一个范围，或者自定义平均价格
     */
    private BigDecimal price;

    /**
     * 某种规格可以直接附加单品图片
     */
    private Long sketchSpecId;

    /**
     * 默认选中的sku
     */
    private Long defaultSkuId;

    private String img;

    private BigDecimal discountPrice;

    private String description;

    private String tags;

    private String detailText; // 商品详情

    @JsonIgnore
    private Date createTime;

    @JsonIgnore
    private Date updateTime;

    @TableLogic
    private Boolean deleted;
}
